
package cn.edu.scau.cmi.yangzhichao.abstractFactory.factory;


import cn.edu.scau.cmi.yangzhichao.abstractFactory.domainAbstractClass.BodyInsurance;
import cn.edu.scau.cmi.yangzhichao.abstractFactory.domainAbstractClass.CarInsurance;
import cn.edu.scau.cmi.yangzhichao.abstractFactory.domainAbstractClass.HurtInsurance;
import cn.edu.scau.cmi.yangzhichao.abstractFactory.domainAbstractClass.TypesInsurance;

/**
 * Created by yzc on 2019/3/28.
 */
public abstract class InsuranceFactory {
    public static InsuranceFactory getFactory(String s){
        switch (s){
            case "平安保险":{
                return new SafeFactory();
            }
            case "中国人寿保险":{
                return new PICCFactory();
            }
            default:return null;
        }
    }
    public abstract void show();
    public abstract BodyInsurance createBodyInsurance();
    public abstract CarInsurance createCarInsurance();
    public abstract HurtInsurance createHurtInsurance();
    public abstract TypesInsurance createTypesInsurance();

}
